package org.example.dormsystem.service.impl;

import org.example.dormsystem.mapper.DormitoryMapper;
import org.example.dormsystem.pojo.Student;
import org.example.dormsystem.service.DormitoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DormitoryServiceImpl implements DormitoryService {
    @Autowired
    DormitoryMapper dormitoryMapper;

    @Override
    public List<Student> searchStudent(String roomNumber) {
        List<Student> list = dormitoryMapper.findStudentByRoomNumber(roomNumber);
        return list;
    }
}
